      <div class="templatemo-content-wrapper">
        <div class="templatemo-content">
          <ol class="breadcrumb">
            <li><a href="<?=site_url()?>/order/index">订单管理</a></li>
            <li class="active">修改备注</li>
          </ol>
         
          <div class="row">
            <div class="col-md-12">
              <div class="table-responsive">
                <h4 class="margin-bottom-15">修改备注</h4>
                 <form role="form" id="templatemo-preferences-form" onsubmit="return false;">
                <div class="row">
                	<div class="col-md-6 margin-bottom-15">
					<label for="firstName" class="control-label">订单号</label> 
					<input type="text" class="form-control" id="orderid" value="<?=$order['id']?>" readonly="readonly">
					</div>
				</div>
				<div class="row">
                   <div class="col-md-6 margin-bottom-15">
                    <label for="lastName" class="control-label">备注</label>
                    <textarea  class="form-control" id="note" rows="8" cols="25" style="resize: none;"><?=$order['note']?></textarea> 
                  </div>
	              </div>
	              <div class="row templatemo-form-buttons">
	                <div class="col-md-12">
	                  <button type="submit" class="btn btn-primary" id="submit_btn">修改</button>
	                </div>
                </div>
                </form>
              </div>
            </div>
          </div>
        </div>
      </div>
<script>
	$(document).ready(function() {
		$("#submit_btn").click(function() {
			var orderid = $("#orderid").val();
			var note = $("#note").val();
			$.ajax({
				url : '<?php echo site_url('order/setnote')?>',
				type : "post",
				async : true,
				data : {
					'orderid' : orderid,
					'note' : note
				},
				dataType : "json",
				timeout : "1000",
				error : function() {
					alert("服务加载出错");
				},
				success : function(data) {
					if(data.code)
					{
						alert(data.msg);
						window.location.href="<?php echo site_url('order/index')?>";
					}else{
						alert(data.msg);
					}
				}
			});
		});
	}); 
</script>